-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: remove nose #15368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TST: remove nose #15368
Conversation
9ad1589
to
9049b5f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Added some minor comments.
else: | ||
msg = "not using" | ||
raise nose.SkipTest("{0} numexpr".format(msg)) | ||
numexpr = pytest.importorskip('numexpr') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't look into if this is important, but the importskip here is not fully equivalent with the above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah this is the only way to actually skip the entire module (well you can simply use a skipif on the classes, but this is cleaner).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant that previously the test was also skipped if _USE_NUMPEXPR is false, now only when the import fails
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_USE_NUMEXPR == can import numexpr (and its not turned off)
exc_failed_import : Exception, optional | ||
Class of the exception to be thrown if import failed. | ||
exc_failed_check : Exception, optional | ||
Class of the exception to be thrown if version check failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also remove the actual arguments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
pandas/util/testing.py
Outdated
package_check(exc_failed_import=SkipTest, | ||
exc_failed_check=SkipTest, | ||
*args, **kwargs) | ||
package_check(*args, **kwargs) | ||
|
||
|
||
def skip_if_no_package_deco(pkg_name, version=None, app='pandas'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this whole function? It's nowhere used, and you removed its tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I don't know how to actually test if a tests is actually skipped; in nose you can catch the SkipTest
, but for pytest you would never do this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, removing it. We have lots of testing cruft that pytest just does for free.
77af519
to
d0e61d7
Compare
TST: remove KnownFailure (unused), should be replaced by pytest.xfail anyhow TST: remove nose xref pandas-dev#15341
TST: raise nose.SkipTest -> pytest.skip TST: remove KnownFailure (unused), should be replaced by pytest.xfail anyhow xref pandas-dev#15341 Author: Jeff Reback <[email protected]> Closes pandas-dev#15368 from jreback/skip and squashes the following commits: afdb5f9 [Jeff Reback] TST: raise nose.SkipTest -> pytest.skip
TST: raise nose.SkipTest -> pytest.skip
TST: remove KnownFailure (unused), should be replaced by pytest.xfail anyhow
xref #15341